home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / VGX / shadows / glo_obj.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.0 KB  |  73 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /*
  18.     glo_obj.h - Definitions for GL based objects.
  19.  
  20.     Tim Heidmann, Silicon Graphics
  21.     Created    Oct 5, 1988
  22.     Last Edit  July 22, 1991
  23. */
  24.  
  25. #ifndef _glo_obj_
  26. #define _glo_obj_
  27.  
  28. /* End of this object command list */
  29. #define ENDLIST   (-32768)
  30. /* Drawing commands and delimiters */
  31. #define BGNTMSH   (-32767)
  32. #define ENDTMSH   (-32766)
  33. #define SWAPTMSH  (-32765)
  34. #define BGNPOLY   (-32764)
  35. #define ENDPOLY   (-32763)
  36. #define BGNLINE   (-32762)
  37. #define ENDLINE   (-32761)
  38. /* Normal/vertex modes */
  39. #define NPERV     (-32760)
  40. #define NPERP     (-32759)
  41. #define NONORM    (-32758)
  42. /* If i >= USEMATL, use material (i - USEMATL) */
  43. #define USEMATL   (-30000)
  44.  
  45. typedef struct {
  46.     int *list;          /* List of control values */
  47.     float (*t)[3];      /* Array of triplets: positions or normals */
  48. } glo_ObjTyp, *glo_ObjPtr;
  49.  
  50. extern glo_ObjTyp glo_cube;
  51.  
  52. /* glo_object library function Prototypes */
  53. void
  54. glo_DrawObj(glo_ObjPtr);
  55. void
  56. glo_DrawGeometry(glo_ObjPtr);  /* Make the v3f calls, but no n3f or lmbind */
  57. void
  58. glo_DrawNormals(glo_ObjPtr);   /* Draw just the normals as yellow vectors */
  59.  
  60. glo_ObjPtr
  61. glo_NewObj(int nList, int nTriplets);
  62.  
  63. glo_ObjPtr
  64. glo_ReadObj(char filename[]);
  65.  
  66. void
  67. glo_WriteObj(glo_ObjPtr theObj, char filename[]);
  68.  
  69. void
  70. glo_GetLengths(glo_ObjPtr theObj, int *listLen, int *tripletLen);
  71.  
  72. #endif
  73.